package com.chaopei.day01;
/*
 *@Author Corday 天涯
 *@Date 2022/3/3 10:44
 * 数据类型与运算符练习
 */
public class MyType {
    public static void main(String[] args) {
     play();
    }//main
    public static void   play(){
        int a = 100;
        float b = 20.4f;
        System.out.println("a/b="+(a/b));
        System.out.println("a%b="+(a%b));
        System.out.println("-------------");
        int x =10;
        //++在前与后y的结果不一样
        //int y = ++x +20;
        int y = x++ +20;
        System.out.println("y="+y);
        System.out.println("x="+x);
        System.out.println("----------------");
        int b1 = 20;
        int b2 = 10;
        System.out.println("20&10="+(b1&b2));
        System.out.println("20|10="+(b1|b2));
        System.out.println("20^10="+(b1^b2));
        int m = 15;
        System.out.println("15<<2="+(m<<2));
        System.out.println("15>>2="+(m>>2));
    }

}
